home *** CD-ROM | disk | FTP | other *** search
- ; flushes memory every x seconds (from CLI, default 10)
-
- ; NOTE - beta!
-
- ; You WILL probably get weird crashes, but read this :
-
- ; Currently, you'll have to add programs on your system to the
- ; list at the very bottom. This is because some programs don't
- ; seem to like having memory flushed so often (especially MUI
- ; apps). IMPORTANT - if you add or remove programs, adjust the
- ; "progs" variable to the correct number!
-
- ; ReFluX just avoids flushing while these programs are running...
-
- ; It's very stable on my system with the programs below ignored,
- ; and I have my full memory available even after running Voyager
- ; and stuff like that :)
-
- ; There are docs in Aminet/util/misc/ReFluX.lha (think that's right)
- ; but that version doesn't ignore any programs at all...
-
- ; version string :
-
- v$="$VER: ReFluX 1.0b (19.2.1998) James L Boyd"
-
- del.w=10 ; default delay between
- ; flushes
-
- If NumPars=1 ; CLI parameters (delay)
-
- a$=Par$(1) ; use only 1st parameter
-
- If a$="?" OR a$="help" OR a$="-h" ; do help, quit
- a$="Usage : ReFlux <delay in 1-300 seconds>"
- PutStr_ &a$
- End
- EndIf
-
- del=Val(a$) ; turn into user's
- If del<1 OR del>300 Then del=10 ; delay value
-
- EndIf
-
- del*50 ; multiply by ticks
-
- progs.b=6 ; no of bad programs!
-
- WBStartup ; run from icon, too
-
- loop
-
- error.b=0
-
- ; ctrl-c check :
-
- If (SetSignal_(0,#SIGBREAKF_CTRL_C) & #SIGBREAKF_CTRL_C) Then End
-
- Delay_ del ; wait for delay time
-
- Restore strings
-
- For a.b=1 To progs
- Read t$
- If error=0
- If FindTask_(&t$) Then error=1 ; don't flush!
- EndIf
- Next a
-
- If error=0
-
- For a=1 To 10
- AllocMem_ $7ffffff0,#MEMF_PUBLIC ; flush ten times :
- Next a ; this is how "avail
- ; flush" does it...
- EndIf
-
- Goto loop
-
- ; Don't flush while these programs are running :
- ; NOTE - make sure "progs" variable is set to the
- ; number of items below!!!
-
- strings:
- Data$ "V","Miami","YAM","MCDPlay","MCDPlayer","Blitz2"
-